<?php
namespace Home\Controller;
use Think\Controller;
class InfoController extends Controller {
    public function _initialize()
    {
        header("Access-Control-Allow-Origin:*");
    }

    public function  index(){
        $name=I('name');
        dump($name);

        $db = M("cartecher");
        $list = $db->where("name='$name'")->find();

        echo json_encode(array("status" => "ok","teclist" => $list, 'info' => 'success'), JSON_UNESCAPED_UNICODE);
    }
}